package com.github.pojo;

import lombok.Data;

@Data
public class WsDataResult<T> extends WsBaseResult {
    private T data;

    public WsDataResult() {}

    public WsDataResult(long request_id, int msg_type, T data) {
        super(request_id, msg_type);
        this.data = data;
    }

    public static WsDataResult<?> success(Object data) {
        return new WsDataResult<>(System.currentTimeMillis(), 3, data);
    }

    public static WsDataResult<?> success(long request_id, Object data) {
        return new WsDataResult<>(request_id, 3, data);
    }
}
